AT-NFC  2.1 (win)
AT-NFC kernel set
emv_const.h
Go to the documentation of this file.
1 #ifndef EMV_CONST_H
2 #define EMV_CONST_H
3 
4 /* ****************************** EMV KERNEL constants used ******************************** */
8 /* ***************************************************************************************** */
9 
10 /* ******************************** Basic Const used in code ******************************* */
17 /* ***************************************************************************************** */
18 #define KER_BIT1 0x01
19 #define KER_BIT2 0x02
20 #define KER_BIT3 0x04
21 #define KER_BIT4 0x08
22 #define KER_BIT5 0x10
23 #define KER_BIT6 0x20
24 #define KER_BIT7 0x40
25 #define KER_BIT8 0x80
27 #define KER_BIT_1_5 0x1F
28 #define KER_BIT_1_7 0x7F
30 #define KER_INT8U_MAX 0xFF
31 #define KER_INT16U_MAX 0xFFFF
32 /* ***************************************************************************************** */
33 
34 /* ******************************* Max Req-APDU size *************************************** */
35 #ifndef EMV_REQ_APDU_MAX_SIZE
36 #define EMV_REQ_APDU_MAX_SIZE 255
37 #endif /* EMV_REQ_APDU_MAX_SIZE */
38 /* ******************************* Max Resp-APDU size ************************************** */
39 #ifndef EMV_RESP_APDU_MAX_SIZE
40 #define EMV_RESP_APDU_MAX_SIZE 256
41 #endif /* EMV_RESP_APDU_MAX_SIZE */
42 /* ********************************** Max PAN size ***************************************** */
43 #ifndef KER_MAX_PAN_LEN
44 #define KER_MAX_PAN_LEN 19
45 #endif /* KER_MAX_PAN_LEN */
46 
47 /* ********************************* POS Entry Modes *************************************** */
48 #ifndef EMV_POS_ENTRY_MODE_MS
49 #define EMV_POS_ENTRY_MODE_MS 0x02
50 #endif /* EMV_POS_ENTRY_MODE_MS */
51 #ifndef EMV_POS_ENTRY_MODE_CHIP
52 #define EMV_POS_ENTRY_MODE_CHIP 0x05
53 #endif /* EMV_POS_ENTRY_MODE_CHIP */
54 #ifndef EMV_POS_ENTRY_MODE_FALLBACK
55 #define EMV_POS_ENTRY_MODE_FALLBACK 0x08
56 #endif /* EMV_POS_ENTRY_MODE_FALLBACK */
57 /* ***************************************************************************************** */
60 /* *********************************** trace marcos **************************************** */
65 /* ***************************************************************************************** */
66 #define KER_DBG_LEVEL_ERR 0
67 #define KER_DBG_LEVEL_WARN 2
68 #define KER_DBG_LEVEL_TRACE_COMMENT 5
69 #define KER_DBG_LEVEL_TAG_LIST 20
70 #define KER_DBG_LEVEL_APDU 30
71 #define KER_DBG_LEVEL_TAG_INFO 40
72 #define KER_DBG_LEVEL_TAG_WARN 100
73 #define KER_DBG_LEVEL_ALL 99
74 /* ***************************************************************************************** */
77 #endif /* EMV_CONST_H */